package com.bw.day_2.fgviewmodel

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import com.bw.base.entity.GonggaoEntity
import com.bw.base.mvvm.BaseViewModel
import com.bw.base.net.ApiService
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.launch
import javax.inject.Inject

@HiltViewModel
class GonggaoViewModel @Inject constructor(val apiService: ApiService):BaseViewModel(){
    val gonggaoSuccess = MutableLiveData<GonggaoEntity>()
    fun announcements(page:Int,size :Int){
        httpRequest({apiService.announcements(page,size)},{gonggaoSuccess.value = it})
    }

}